package com.nulstudio.sppm.Dao;

import com.nulstudio.sppm.Entities.InventoryEntry;
import com.nulstudio.sppm.Entities.Warehouse;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface InventoryEntryMapper {
    public List<InventoryEntry> getAllWarehouses(@Param("id") int id);
    public int addWarehouse(InventoryEntry inventoryEntry);
    public int modifyWarehouse(@Param("name")String name,@Param("quantity")int quantity,@Param("supplierName")String SupplierName,@Param("costPrice")float costPrice,@Param("nid") int nid);
    public int deleteWarehouse(@Param("id") int id);

    public int getLastId();

    public int containedId(@Param("id") int id);
    public int transferEntry1(@Param("sourceId")int sourceId,@Param("commodityId")int commodityId,@Param("quantity")int quantity);
    public int transferEntry2(@Param("targetId")int targetId,@Param("commodityId")int commodityId,@Param("quantity")int quantity);

}
